// 导入数据库操作
const { sqlOne, sqlBatch } = require('../db/common')
// 加密工具包bcryptjs
const bcrypt = require('bcryptjs')
// 引入jwt
const jwt = require('jsonwebtoken')
// 引入加密字符串
const config = require('../utils/config')
// 导入工具
const utils = require('../utils/index')

// 成功响应 onSuccess 失败响应 onError

// 登录函数
exports.getCategory = async (req, res) => {
  const sql = "SELECT id,name,remark FROM t_category where status=1 ORDER BY createdAt";
  const results = await sqlOne(sql)
  res.onSuccess(results)
}

